﻿Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Text
Imports System.Windows.Media
Imports System.Data
Namespace SimpleChart.Charts

    Public Class Bar
#Region "Private Variables"

        Private m_barColor As Color = Colors.Red
        Private m_barWidth As Double = 5
        Private m_barLabel As String
        Private m_colorOnMouseOver As Color = Colors.Yellow
        Private m_timeStamp As DateTime


        Private height As Double
        Private m_id As String
        Private m_barValue As Double
        Private m_top As Double
        Private m_left As Double

        Private m_queryParam As String
        Private m_paramValue As String

        Private dataRow As DataRow


#End Region

#Region "Properties"

        Public Property BarColor() As Color
            Get
                Return m_barColor
            End Get
            Set(ByVal value As Color)
                m_barColor = value
            End Set
        End Property

        Public Property BarWidth() As Double
            Get
                Return m_barWidth
            End Get
            Set(ByVal value As Double)
                m_barWidth = value
            End Set
        End Property

        Public Property BarLabel() As String
            Get
                Return m_barLabel
            End Get
            Set(ByVal value As String)
                m_barLabel = value
            End Set
        End Property

        Public Property ColorOnMouseOver() As Color
            Get
                Return m_colorOnMouseOver
            End Get
            Set(ByVal value As Color)
                m_colorOnMouseOver = value
            End Set
        End Property

        Public Property TimeStamp() As DateTime
            Get
                Return m_timeStamp
            End Get
            Set(ByVal value As DateTime)
                m_timeStamp = value
            End Set
        End Property

        Public Property QueryParam() As String
            Get
                Return Me.m_queryParam
            End Get
            Set(ByVal value As String)
                Me.m_queryParam = value
            End Set
        End Property


        Public Property ParamValue() As String
            Get
                Return Me.m_paramValue
            End Get
            Set(ByVal value As String)
                Me.m_paramValue = value
            End Set
        End Property


        Public Property BarHeight() As Double
            Get
                Return Me.height
            End Get
            Set(ByVal value As Double)
                Me.height = value
            End Set
        End Property

        Public Property Top() As Double
            Get
                Return Me.m_top
            End Get
            Set(ByVal value As Double)
                Me.m_top = value
            End Set
        End Property


        Public Property Left() As Double
            Get
                Return Me.m_left
            End Get
            Set(ByVal value As Double)
                Me.m_left = value
            End Set
        End Property


        Public Property ID() As String
            Get
                Return Me.m_id
            End Get
            Set(ByVal value As String)
                Me.m_id = value
            End Set
        End Property

        Public Property BarValue() As Double
            Get
                Return Me.m_barValue
            End Get
            Set(ByVal value As Double)
                Me.m_barValue = value
            End Set
        End Property

        Private _ValueField As String
        Public Property ValueField() As String
            Get
                Return _ValueField
            End Get
            Set(ByVal value As String)
                _ValueField = value
            End Set
        End Property

        Public Sub New()

        End Sub


        Public Sub New(ByVal value As Double, ByVal row As DataRow, ByVal valueField As String)
            Me.m_id = String.Empty
            Me.m_barValue = value
            Me.ValueField = valueField
            Me.dataRow = row
        End Sub

        Public Property BarRow() As DataRow
            Get
                Return dataRow
            End Get
            Set(ByVal value As DataRow)
                dataRow = value
            End Set
        End Property


#End Region

    End Class
End Namespace
